package com.zxw.common.core.base.bean.toc;

import com.zxw.common.core.base.enums.toc.FileTypeEnum;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author Xuewei.Zhang
 * @date 2022/9/16
 */
@Configuration
public class FlowToCBean {

    @Bean("FileTypeEnumBean")
    public Map<String, Integer> FileTypeEnumBean() {
        Map<String, Integer> map = new ConcurrentHashMap<>();
        for (FileTypeEnum fileTypeEnum :FileTypeEnum.values() ){
            map.put(fileTypeEnum.getMsg(),fileTypeEnum.getCode());
        }
        return map;
    }

}
